<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="/struts-dojo-tags" prefix="sx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
        <title>SCA - PESQUISAR ALUNO</title>
    </head>
    <body>
        <h1>PESQUISAR ALUNO</h1>

        <s:form action="Aluno">
            <s:textfield name="nomeAluno" label="Nome Aluno"></s:textfield>
            <s:submit action="pesquisarAluno" value="Pesquisar"></s:submit>


                <table>
                    <tr>
                        <th>Matricula</th>
                        <th>Nome</th>
                        <th colspan="5">Ações</th>
                    </tr>
                <s:iterator value="alunos">
                    <tr>
                        <td>${matricula}</td>
                        <td>${nome}</td>
                        <td>Consultar</td>
                        <td>
                            <s:url id="editarAluno" action="editarAluno">
                                <s:param name="matricula" value="%{matricula}"></s:param>
                            </s:url>
                            <s:a href="%{editarAluno}">Editar</s:a>
                            </td>
                            <td>
                            <s:url id="excluirAluno" action="excluirAluno">
                                <s:param name="matricula" value="%{matricula}"></s:param>
                            </s:url>
                            <s:a href="%{excluirAluno}">Excluir</s:a>
                            </td>
                            <td>
                            <s:url id="efetuarMatricular" action="efetuarMatricular">
                                <s:param name="matricula" value="%{matricula}"></s:param>
                            </s:url>
                            <s:a href="%{efetuarMatricular}">Matricular</s:a>
                            </td>
                            <td>
                            <s:url id="consultarNotaFrequencia" action="consultarNotaFrequencia">
                                <s:param name="matriculaAluno" value="%{matricula}"></s:param>
                            </s:url>
                            <s:a href="%{consultarNotaFrequencia}">Consultar Nota e Frequecia</s:a></td>
                    </tr>
                </s:iterator>

                <s:submit action="voltarAluno" value="Voltar"></s:submit>
                <s:submit action="incluirAluno" value="Incluir"></s:submit>
                </table>
        </s:form>

       
    </body>
</html>